Skip to content

Update useInsertionEffect docs #6172

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 24, 2023

Conversation

rickhanlonii
Copy link
Member

The timing of insertion effects are wrong. The timing today is after DOM mutations, not before, but may change in the future so the timing should not be depended on.

Also added a caveats about the interleaving of cleanup and setup, which is different than other types of effects and may be observable via logging.

@github-actions
Copy link

Size changes

📦 Next.js Bundle Analysis for react-dev

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

@rickhanlonii rickhanlonii requested a review from gaearon July 21, 2023 15:24
@rickhanlonii rickhanlonii merged commit d86cfc4 into reactjs:main Jul 24, 2023
@rickhanlonii rickhanlonii deleted the rh/insertion-effect branch July 24, 2023 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants